<?php

namespace App\Model;

class ProjectsModel extends BaseModel
{
    protected $table = 'projects';

    protected $primaryKey='project_id';


    protected $fillable = [
        'project_name',
        'project_image_project_view_url',
        'project_view_url',
        'project_text_info',
        'project_imgs',
        'category_id',
        'project_price',
        'project_price_huiyuan',
        'project_price_hehuo',
        'product_type',
        'xiaoliang',
        'show_num',
        'vip_level_index'
    ];



    public function categoryInfo(): \Illuminate\Database\Eloquent\Relations\HasOne
    {
        return $this->hasOne(CategoryModel::class,'category_id','category_id');
    }

}
